<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body>
    <script>
      // console.log("*".repeat(3));
      function phone(mobile, len = 3) {
        return String(mobile).slice(0, len * -1) + "*".repeat(len);
      }
      console.log(phone("98765432101", 10));
    </script>
  </body>
</html>
